{extend name="layout/main-block" /}

<!-- main content start -->
{block name="content"}
<section id="main-content">
    <section class="wrapper">
        <div class="row">
            <ol class="breadcrumb">
                <li class="h4"><a href="">{$title}</a></li>
                <li class="h4"><a href="">子分类</a></li>
            </ol>
        </div>
        <div class="row col-sm-1" style="margin-bottom: 20px;">
            <a href="{:url('modules/tab_create',['menu_id'=>$menu_id])}" class="btn btn-primary" role="button">添加子分类</a>
        </div>
        <div class="row content-main">
            <div class="col-sm-12">
                <form action="">
                    <div class="form-group">
                        <div class="col-sm-9">
                            <input type="hidden" name="p_id" value="{$p_id}">
                        </div>
                    </div>
                    <table class="table table-striped">
                        <tr>
                            <th>id</th>
                            <th>分类名称中文</th>
                            <th>分类名称英文</th>
                            <th>操作</th>
                        </tr>
                        {notempty name="menu_2"}
                        {volist name="menu_2" id="v"}
                        <tr>
                            <td>{$v.menu_id}</td>
                            <td>{$v.menu_name_cn |mb_substr=0,8}</td>
                            <td>{$v.menu_name_en |mb_substr=0,10}</td>
                            <td class="operation">
                                <a class="btn btn-info btn-xs" href="{:url('modules/modules_update', ['menu_id'=>$menu_id,'id'=>$v.menu_id])}"><i class="glyphicon glyphicon-edit"></i>修改</a>
                                <a class="	btn btn-danger btn-xs" href="{:url('modules/modules_delete', ['menu_id'=>$menu_id,'id'=>$v.menu_id])}" onclick="return confirm('确定要删除吗？');"><i class="glyphicon glyphicon-remove"></i>删除</a>
                                <a class="btn btn-primary btn-xs" href="{:url('modules/tab_create', ['menu_id'=>$menu_id,'id'=>$v.menu_id])}" ><i class="glyphicon glyphicon-plus"></i>添加子分类</a>
                            </td>
                        </tr>
                        <!--二级循环-->
                        {notempty name="v.child"}
                            {volist name="v.child" id="v1"}
                            <tr>
                                <td>{$v1.tab_id}</td>
                                <td>--{$v1.tab_name_cn |mb_substr=0,8}</td>
                                <td>--{$v1.tab_name_en |mb_substr=0,10}</td>
                                <td class="operation">
                                    <a class="btn btn-info btn-xs" href="{:url('modules/tab_update', ['menu_id'=>$menu_id,'id'=>$v1.tab_id])}"><i class="glyphicon glyphicon-edit"></i>修改</a>
                                    <a class="	btn btn-danger btn-xs" href="{:url('modules/tab_delete', ['menu_id'=>$menu_id,'id'=>$v1.tab_id])}" onclick="return confirm('确定要删除吗？');"><i class="glyphicon glyphicon-remove"></i>删除</a>

                                </td>
                            </tr>
                            {/volist}
                        {/notempty}
                       <!-- 二层循环结束-->
                        {/volist}
                        {/notempty}
                        {volist name="tab" id="v"}
                        <tr>
                            <td>{$v.tab_id}</td>
                            <td>{$v.tab_name_cn |mb_substr=0,8}</td>
                            <td>{$v.tab_name_en |mb_substr=0,10}</td>

                            <td class="operation">
                                <a class="btn btn-info btn-xs" href="{:url('modules/tab_update', ['menu_id'=>$menu_id,'id'=>$v.tab_id])}"><i class="glyphicon glyphicon-edit"></i>修改</a>
                                <a class="	btn btn-danger btn-xs" href="{:url('modules/tab_delete', ['menu_id'=>$menu_id,'id'=>$v.tab_id])}" onclick="return confirm('确定要删除吗？');"><i class="glyphicon glyphicon-remove"></i>删除</a>
                               <!-- <a href="{:url('modules/list_create', ['id'=>$v.tab_id])}" >添加子分类</a>-->
                            </td>
                        </tr>
                        {/volist}


                    </table>
                </form>
            </div>
        </div>
        {$page}
    </section>
</section>
{/block}